package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.QueryObject;
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    //按照主键删除用户信息
    public abstract int deleteByPrimaryKey(Long paramLong);
    //添加用户信息
    public abstract int insert(Employee paramEmployee);
    //按照主键查询用户信息
    public abstract Employee selectByPrimaryKey(Long paramLong);
    //查询所有的用户信息
    public abstract List<Employee> selectAll();
    //按照主键修改用户信息
    public abstract int updateByPrimaryKey(Employee paramEmployee);
    //查询用户的条数（分页查询）
//    public abstract Integer selectForCount(QueryObject paramQueryObject);
    //查询用户的所有信息（分页查询）
    public abstract List<Employee> selectForList(QueryObject paramQueryObject);
    //通过用户名和用户密码查询对应的用户信息
    public abstract Employee selectByInfo(@Param("username") String paramString1, @Param("password") String paramString2);
    //为用户添加角色
    public abstract void insertRelation(@Param("eid") Long paramLong1, @Param("rid") Long paramLong2);
    //删除用户的同时删除关系表中的数据
    public abstract void deleteRelation(Long eid);

    public abstract void deleteBbatch(Long[] ids);

    public abstract Employee get(String name);
    public abstract List<Employee> selectAllForList();

    public abstract Employee selectById(Long id);
}
